3.146 \(\int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\)

Optimal. Leaf size=121 \[ \frac{2 \sin ^5(c+d x)}{21 a^3 d}-\frac{20 \sin ^3(c+d x)}{63 a^3 d}+\frac{10 \sin (c+d x)}{21 a^3 d}+\frac{4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3} \]

[Out]

(10*Sin[c + d*x])/(21*a^3*d) - (20*Sin[c + d*x]^3)/(63*a^3*d) + (2*Sin[c + d*x]^5)/(21*a^3*d) + ((I/9)*Cos[c +
 d*x]^3)/(d*(a + I*a*Tan[c + d*x])^3) + (((4*I)/21)*Cos[c + d*x]^5)/(d*(a^3 + I*a^3*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.11338, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3502, 3500, 2633} \[ \frac{2 \sin ^5(c+d x)}{21 a^3 d}-\frac{20 \sin ^3(c+d x)}{63 a^3 d}+\frac{10 \sin (c+d x)}{21 a^3 d}+\frac{4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(10*Sin[c + d*x])/(21*a^3*d) - (20*Sin[c + d*x]^3)/(63*a^3*d) + (2*Sin[c + d*x]^5)/(21*a^3*d) + ((I/9)*Cos[c +
 d*x]^3)/(d*(a + I*a*Tan[c + d*x])^3) + (((4*I)/21)*Cos[c + d*x]^5)/(d*(a^3 + I*a^3*Tan[c + d*x]))

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rule 3500

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*d^2
*(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1))/(b*f*(m + 2*n)), x] - Dist[(d^2*(m - 2))/(b^2*(m + 2*n
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}+\frac{2 \int \frac{\cos ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{3 a}\\ &=\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )}+\frac{10 \int \cos ^5(c+d x) \, dx}{21 a^3}\\ &=\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )}-\frac{10 \operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{21 a^3 d}\\ &=\frac{10 \sin (c+d x)}{21 a^3 d}-\frac{20 \sin ^3(c+d x)}{63 a^3 d}+\frac{2 \sin ^5(c+d x)}{21 a^3 d}+\frac{i \cos ^3(c+d x)}{9 d (a+i a \tan (c+d x))^3}+\frac{4 i \cos ^5(c+d x)}{21 d \left (a^3+i a^3 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.225129, size = 98, normalized size = 0.81 \[ \frac{\sec ^3(c+d x) (-378 i \sin (2 (c+d x))+216 i \sin (4 (c+d x))+14 i \sin (6 (c+d x))-567 \cos (2 (c+d x))+162 \cos (4 (c+d x))+7 \cos (6 (c+d x))-210)}{2016 a^3 d (\tan (c+d x)-i)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(Sec[c + d*x]^3*(-210 - 567*Cos[2*(c + d*x)] + 162*Cos[4*(c + d*x)] + 7*Cos[6*(c + d*x)] - (378*I)*Sin[2*(c +
d*x)] + (216*I)*Sin[4*(c + d*x)] + (14*I)*Sin[6*(c + d*x)]))/(2016*a^3*d*(-I + Tan[c + d*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.103, size = 207, normalized size = 1.7 \begin{align*} 2\,{\frac{1}{d{a}^{3}} \left ({\frac{{\frac{23\,i}{3}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{2\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{8}}}+{\frac{9/4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-{\frac{{\frac{59\,i}{8}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+4/9\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-9}-{\frac{34}{7\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{7}}}+{\frac{35}{4\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}-{\frac{19}{4\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{57}{64\,\tan \left ( 1/2\,dx+c/2 \right ) -64\,i}}-{\frac{i/32}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-1/48\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-3}+{\frac{7}{64\,\tan \left ( 1/2\,dx+c/2 \right ) +64\,i}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x)

[Out]

2/d/a^3*(23/3*I/(tan(1/2*d*x+1/2*c)-I)^6-2*I/(tan(1/2*d*x+1/2*c)-I)^8+9/4*I/(tan(1/2*d*x+1/2*c)-I)^2-59/8*I/(t
an(1/2*d*x+1/2*c)-I)^4+4/9/(tan(1/2*d*x+1/2*c)-I)^9-34/7/(tan(1/2*d*x+1/2*c)-I)^7+35/4/(tan(1/2*d*x+1/2*c)-I)^
5-19/4/(tan(1/2*d*x+1/2*c)-I)^3+57/64/(tan(1/2*d*x+1/2*c)-I)-1/32*I/(tan(1/2*d*x+1/2*c)+I)^2-1/48/(tan(1/2*d*x
+1/2*c)+I)^3+7/64/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.3048, size = 289, normalized size = 2.39 \begin{align*} \frac{{\left (-21 i \, e^{\left (12 i \, d x + 12 i \, c\right )} - 378 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 945 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 420 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 189 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 54 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{4032 \, a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/4032*(-21*I*e^(12*I*d*x + 12*I*c) - 378*I*e^(10*I*d*x + 10*I*c) + 945*I*e^(8*I*d*x + 8*I*c) + 420*I*e^(6*I*d
*x + 6*I*c) + 189*I*e^(4*I*d*x + 4*I*c) + 54*I*e^(2*I*d*x + 2*I*c) + 7*I)*e^(-9*I*d*x - 9*I*c)/(a^3*d)

________________________________________________________________________________________

Sympy [A]  time = 1.59516, size = 267, normalized size = 2.21 \begin{align*} \begin{cases} \frac{\left (- 811748818944 i a^{18} d^{6} e^{28 i c} e^{3 i d x} - 14611478740992 i a^{18} d^{6} e^{26 i c} e^{i d x} + 36528696852480 i a^{18} d^{6} e^{24 i c} e^{- i d x} + 16234976378880 i a^{18} d^{6} e^{22 i c} e^{- 3 i d x} + 7305739370496 i a^{18} d^{6} e^{20 i c} e^{- 5 i d x} + 2087354105856 i a^{18} d^{6} e^{18 i c} e^{- 7 i d x} + 270582939648 i a^{18} d^{6} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{155855773237248 a^{21} d^{7}} & \text{for}\: 155855773237248 a^{21} d^{7} e^{25 i c} \neq 0 \\\frac{x \left (e^{12 i c} + 6 e^{10 i c} + 15 e^{8 i c} + 20 e^{6 i c} + 15 e^{4 i c} + 6 e^{2 i c} + 1\right ) e^{- 9 i c}}{64 a^{3}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a+I*a*tan(d*x+c))**3,x)

[Out]

Piecewise(((-811748818944*I*a**18*d**6*exp(28*I*c)*exp(3*I*d*x) - 14611478740992*I*a**18*d**6*exp(26*I*c)*exp(
I*d*x) + 36528696852480*I*a**18*d**6*exp(24*I*c)*exp(-I*d*x) + 16234976378880*I*a**18*d**6*exp(22*I*c)*exp(-3*
I*d*x) + 7305739370496*I*a**18*d**6*exp(20*I*c)*exp(-5*I*d*x) + 2087354105856*I*a**18*d**6*exp(18*I*c)*exp(-7*
I*d*x) + 270582939648*I*a**18*d**6*exp(16*I*c)*exp(-9*I*d*x))*exp(-25*I*c)/(155855773237248*a**21*d**7), Ne(15
5855773237248*a**21*d**7*exp(25*I*c), 0)), (x*(exp(12*I*c) + 6*exp(10*I*c) + 15*exp(8*I*c) + 20*exp(6*I*c) + 1
5*exp(4*I*c) + 6*exp(2*I*c) + 1)*exp(-9*I*c)/(64*a**3), True))

________________________________________________________________________________________

Giac [A]  time = 1.17019, size = 231, normalized size = 1.91 \begin{align*} \frac{\frac{21 \,{\left (21 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 36 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 19\right )}}{a^{3}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{3}} + \frac{3591 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 19656 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 56196 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 95760 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 107730 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 79464 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 38484 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 10944 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1615}{a^{3}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{9}}}{2016 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/2016*(21*(21*tan(1/2*d*x + 1/2*c)^2 + 36*I*tan(1/2*d*x + 1/2*c) - 19)/(a^3*(tan(1/2*d*x + 1/2*c) + I)^3) + (
3591*tan(1/2*d*x + 1/2*c)^8 - 19656*I*tan(1/2*d*x + 1/2*c)^7 - 56196*tan(1/2*d*x + 1/2*c)^6 + 95760*I*tan(1/2*
d*x + 1/2*c)^5 + 107730*tan(1/2*d*x + 1/2*c)^4 - 79464*I*tan(1/2*d*x + 1/2*c)^3 - 38484*tan(1/2*d*x + 1/2*c)^2
 + 10944*I*tan(1/2*d*x + 1/2*c) + 1615)/(a^3*(tan(1/2*d*x + 1/2*c) - I)^9))/d